<template>
    <el-header style="text-align: right; font-size: 12px">
        <div class="toolbar" style="margin-top: 25px;">
            <el-dropdown>
                <el-icon style="margin-right: 8px; margin-top: 1px">
                    <setting />
                </el-icon>
                <template #dropdown>
                    <el-dropdown-menu>
                        <el-dropdown-item @click="signout">退出</el-dropdown-item>
                    </el-dropdown-menu>
                </template>
            </el-dropdown>
            <span>Tom</span>
        </div>
    </el-header>
</template>

<script lang="ts" setup>
import { Setting } from '@element-plus/icons-vue'
import { useRouter } from 'vue-router';


const router = useRouter()
const signout = () => {
    router.push('/login')
    localStorage.setItem('Token', '')
}
</script>

<style lang="scss" ></style>